Skip to content

Comments

Phase 2 of rk_stratiform CCPPization: diagnostic schemes#234

Merged
jimmielin merged 13 commits intoESCOMP:developmentfrom
jimmielin:hplin/rk_stratiform_p2
Jun 16, 2025
Merged

Phase 2 of rk_stratiform CCPPization: diagnostic schemes#234
jimmielin merged 13 commits intoESCOMP:developmentfrom
jimmielin:hplin/rk_stratiform_p2

Conversation

@jimmielin
Copy link
Member

@jimmielin jimmielin commented Apr 14, 2025

Originator(s): @jimmielin

Description (include issue title and the keyword ['closes', 'fixes', 'resolves'] and issue number):

List all namelist files that were added or changed: N/A

List all files eliminated and why: N/A

List all files added and what they do:

A       schemes/sima_diagnostics/compute_cloud_fraction_diagnostics.F90
A       schemes/sima_diagnostics/compute_cloud_fraction_diagnostics.meta
A       schemes/sima_diagnostics/convective_cloud_cover_diagnostics.F90
A       schemes/sima_diagnostics/convective_cloud_cover_diagnostics.meta
  - cldfrc diagnostic schemes,
  - including split out shallow/deep convective cloud cover in convective_cloud_cover scheme

A       schemes/sima_diagnostics/cloud_particle_sedimentation_diagnostics.F90
A       schemes/sima_diagnostics/cloud_particle_sedimentation_diagnostics.meta
A       schemes/sima_diagnostics/rk_stratiform_diagnostics.F90
A       schemes/sima_diagnostics/rk_stratiform_diagnostics.meta
  - RK diagnostic schemes

List all existing files that have been modified, and describe the changes:
(Helpful git command: git diff --name-status development...<your_branch_name>)

M       schemes/cloud_fraction/compute_cloud_fraction.meta
M       schemes/cloud_fraction/convective_cloud_cover.meta
M       schemes/hack_shallow/hack_convect_shallow.meta
M       schemes/rasch_kristjansson/cloud_particle_sedimentation.F90
M       schemes/rasch_kristjansson/cloud_particle_sedimentation.meta
M       schemes/rasch_kristjansson/prognostic_cloud_water.F90
M       schemes/rasch_kristjansson/prognostic_cloud_water.meta
M       schemes/rasch_kristjansson/rk_stratiform.meta
  - update with assigned standard names
  - minor cleanup of unused variables

List all automated tests that failed, as well as an explanation for why they weren't fixed:
N/A

Is this an answer-changing PR? If so, is it a new physics package, algorithm change, tuning change, etc?
N/A - SIMA diagnostics only

If yes to the above question, describe how this code was validated with the new/modified features:
N/A

@jimmielin jimmielin self-assigned this Apr 14, 2025
@jimmielin
Copy link
Member Author

jimmielin commented Apr 21, 2025

Note to self that once ESCOMP/CAM#1296 (review) is merged the magic numbers here for iwc/lwc also need to be updated to use physconst::rair

Completed in 2639a45

@jimmielin jimmielin marked this pull request as ready for review May 6, 2025 19:34
@nusbaume nusbaume self-requested a review May 7, 2025 16:59
Copy link
Collaborator

@nusbaume nusbaume left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good @jimmielin! I did have some questions and suggestions, but hopefully nothing that will be too difficult to resolve (although if that is not the case please let me know). Thanks!

call history_add_field('DLSED', 'tendency_of_cloud_liquid_water_mixing_ratio_wrt_moist_air_and_condensed_water_due_to_sedimentation', 'lev', 'avg', 'kg kg-1 s-1')
call history_add_field('HSED', 'tendency_of_dry_air_enthalpy_at_constant_pressure_due_to_sedimentation', 'lev', 'avg', 'J kg-1 s-1')
call history_add_field('PRECSED', 'stratiform_cloud_water_surface_flux_due_to_sedimentation', horiz_only, 'inst', 'm s-1')
call history_add_field('SNOWSED', 'lwe_cloud_ice_sedimentation_rate_at_surface_due_to_microphysics', horiz_only, 'inst', 'm s-1')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason SNOWSED has a different long name compare to the PRECSED and RAINSED variables? For example I imagine one could do the following instead to better match the other two fields:

stratiform_lwe_cloud_ice_surface_flux_due_to_sedimentation

But maybe there is a reason to keep the long name as-is?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the question! SNOWSED had a previously-assigned standard name from pbuf_SNOW_SED so it looks different than the others maybe due to the passage of time. So maybe it can be updated to be up to the more recent guidelines / consistency with the current standard names?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the explanation @jimmielin! Given that SNOWSED appears to be the exact same physical quantity as PRECSED but just for ice I might vote to give the name I specified above. Of course if this is going to involve additional work elsewhere (e.g. in other physics schemes) then feel free to just make an issue for it and we can deal with it later. Thanks!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @nusbaume, updated to stratiform_lwe_cloud_ice_surface_flux_due_to_sedimentation!

@jimmielin jimmielin requested a review from nusbaume May 13, 2025 21:30
Copy link
Collaborator

@nusbaume nusbaume left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great to me now! I did leave one comment unresolved with regards to the SNOWSED variable but I am happy to just make an issue for it and deal with it later if that is easiest.

@nusbaume nusbaume requested a review from cacraigucar May 14, 2025 03:18
Copy link
Collaborator

@cacraigucar cacraigucar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note - I did not review the SDFs - I assume that they mimic what is being done in CAM

@@ -0,0 +1,85 @@
! Diagnostics for RK stratiform - cloud particle sedimentation
! Haipeng Lin, March 2025
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm questioning the need/wisdom of tagging the author/date of the new routines. I don't believe this has been done with other converted routines and git gives you the information. I know CAM did this for awhile, but everytime somebody edited the routine, they put their name/data/changes at the top of the routine and this became fairly large for some routines. I think we have moved away from this since we now have git tracking everything,

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @cacraigucar! I wonder about this as well and maybe we should loop others into this discussion.

I am happy to remove this for the diagnostic schemes since these are new files in atmospheric_physics, but for converted schemes (many of which had the header of name/data/changes you mentioned) where code was moved from CAM, Git won't have the history since it's not moved over from CAM and I've decided to copy over (or track down if needed) the original authors list for attribution purposes. Some of the history, particularly for CAM4, is only in SVN so Git won't show those either. I'm happy to discuss and go either way!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we agreed that these authorship comments should be removed

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, removed throughout!

@jimmielin jimmielin requested a review from cacraigucar June 16, 2025 17:19
@@ -0,0 +1,85 @@
! Diagnostics for RK stratiform - cloud particle sedimentation
! Haipeng Lin, March 2025
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe we agreed that these authorship comments should be removed

@jimmielin
Copy link
Member Author

SIMA regression tests passed except FCAM4 changes (expected). There is one new RK test introduced for Derecho/GNU to test snapshots. A future test will be added in ESCOMP/CAM-SIMA#397 for testing history output baselines of physics schemes.

aux_sima_intel_20250616151204: 6 tests
  SMS_Ln9.ne3pg3_ne3pg3_mg37.FCAM4.derecho_intel.cam-outfrq_se_cslam_analy_ic (Overall: NLFAIL) details:
    FAIL SMS_Ln9.ne3pg3_ne3pg3_mg37.FCAM4.derecho_intel.cam-outfrq_se_cslam_analy_ic NLCOMP

Found extra namelist: cldfrc_nl
Found extra namelist: cldsed_nl
Found extra namelist: convective_cloud_cover_nl
Found extra namelist: rk_stratiform_nl
aux_sima_gnu_20250616151210: 14 tests
  SMS_Ln2.ne3pg3_ne3pg3_mg37.FPHYStest.derecho_gnu.cam-outfrq_rk_stratiform_derecho (Overall: DIFF) details:
    FAIL SMS_Ln2.ne3pg3_ne3pg3_mg37.FPHYStest.derecho_gnu.cam-outfrq_rk_stratiform_derecho NLCOMP
    FAIL SMS_Ln2.ne3pg3_ne3pg3_mg37.FPHYStest.derecho_gnu.cam-outfrq_rk_stratiform_derecho BASELINE /glade/campaign/cesm/community/amwg/sima_baselines/latest_gnu: ERROR BFAIL baseline directory '/glade/campaign/cesm/community/amwg/sima_baselines/latest_gnu/SMS_Ln2.ne3pg3_ne3pg3_mg37.FPHYStest.derecho_gnu.cam-outfrq_rk_stratiform_derecho' does not exist
  SMS_Ln9.ne3pg3_ne3pg3_mg37.FCAM4.derecho_gnu.cam-outfrq_se_cslam_analy_ic (Overall: NLFAIL) details:
    FAIL SMS_Ln9.ne3pg3_ne3pg3_mg37.FCAM4.derecho_gnu.cam-outfrq_se_cslam_analy_ic NLCOMP

@jimmielin jimmielin merged commit 4a31043 into ESCOMP:development Jun 16, 2025
3 checks passed
peverwhee added a commit that referenced this pull request Jun 23, 2025
Tag name (The PR title should also include the tag name):
atmos_phys0_14_000
Originator(s): peverwhee

List all `development` PR numbers included in this PR and the title of
each:
1. Draft aerosol classes (#209)
2. Fix broken dme_adjust tests (#237)
3. Fix erroneous code in MUSICA during the CAM-SIMA run (#226)
4. Initial file reader object (#240)
5. Break up file i/o object into explicit interfaces (#248)
6. Update MUSICA library (#249)
7. Fix invalid horizontal dimensions (#251)
8. Add YSU orographic gravity wave drag scheme (#232)
9. Phase 2 of rk_stratiform CCPPization: diagnostic schemes (#234)
10. Update MUSICA suite (#252)
11. RRTMGP longwave fortran modules (#230)

List all automated tests that failed, as well as an explanation for why
they weren't fixed: n/a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Tag

Development

Successfully merging this pull request may close these issues.

3 participants